package com.gage.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.gage.model.SysBaseDict;
import com.gage.model.vo.BaseConditionVO;
@Repository
public interface SysBaseDictMapper extends BaseMapper<SysBaseDict>
{
	/**
	 * 取子栏目
	 * @param id
	 * @return
	 */
	List<SysBaseDict> findByPid(@Param("Pid") String Pid);
	List<Map<String, Object>> selectDictsPage(Pagination page, Map<String, Object> params);
	void updateDictLevel(@Param("ids") List<String> ids,@Param("i") Integer i);
/*****************************************************/
	Integer getCountChild(@Param("id") String id);

	Integer deleteByIds(@Param("ids") List<String> ids);

	Integer getMaxSequence(@Param("parentid") String parentid);

	Integer getLevel(@Param("dictcode") String dictcode);

	SysBaseDict getDictByDictcode(@Param("dictcode") String dictcode);

	List<String> getChildDictcodeList(@Param("parentid") String parentid);

	List<SysBaseDict> findPageBreakByCondition(BaseConditionVO vo, String pid, RowBounds rb);

	Integer findNumberByCondition(BaseConditionVO vo, String pid);

	List<SysBaseDict> getUnitCode(@Param("dictcode") String dictcode);

	List<SysBaseDict> findDepartmentByCondition(@Param("id") String id);

	int getDepartmentCountChild(@Param("id") String id);
}
